#ifndef PresetEditWindow_H
#define PresetEditWindow_H

class LightingPreset; /* defined in MainWindow.h */
class PresetValue; /* defined in MainWindow.h */

#include <QtGui>

class PresetEditWindow : public QWidget
{
	Q_OBJECT
	
public:
	PresetEditWindow(LightingPreset *preset);
	
	LightingPreset *preset() { return m_preset; }
	
signals:
	void presetNameChanged(const QString&);
	void presetNumChanged(int);
	void editorClosed(LightingPreset*);
	
protected:
	void setupGui();
	
	void closeEvent(QCloseEvent*) { emit editorClosed(preset()); }

protected slots:
	void generateSliderUI();
	
	void showChangesLive(bool);
	
	void sliderValueChanged(int);
	void nameChanged(QString);
	void ignoreChanged(bool);
	//void presetNumChanged(int);
	
	void updateIgnoreUi(PresetValue*);
	
protected:
	// Parent for the present control widgets
	QGroupBox *m_controlWidgetBase;
	
	// GridLayout for the sliders
	QGridLayout *m_sliderGrid;
	
	QCheckBox *m_showIgnored;
	
	LightingPreset *m_preset;
	
	bool m_lockValueChanged;
	bool m_showChangesLive;
};


#endif
